<?php /* Smarty version 2.6.16, created on 2013-09-10 13:42:08
         compiled from ../templates/default//modules/leads/myleads.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'truncate', '../templates/default//modules/leads/myleads.tpl', 116, false),array('modifier', 'base64_encode', '../templates/default//modules/leads/myleads.tpl', 121, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['header_start'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
  echo '<link rel="stylesheet" type="text/css" href="';  echo $this->_tpl_vars['siteroot'];  echo '/templates/default/style/dashboard.css"><script type="text/javascript" src="';  echo $this->_tpl_vars['siteroot'];  echo '/includes/js/interest.js"></script><script type="text/javascript" src="';  echo $this->_tpl_vars['siteroot'];  echo '/greybox/greybox.js"></script><link href="';  echo $this->_tpl_vars['siteroot'];  echo '/greybox/greybox.css" rel="stylesheet" type="text/css" media="all" /><link rel="stylesheet" type="text/css" href="';  echo $this->_tpl_vars['siteroot'];  echo '/templates/default/style/find_job_list.css">'; ?>

<?php echo '
<script type="text/javascript" language="javascript">
function searchOrder()
{
	
	var Jobtype = $(\'#jobtype\').val();
	var Budget = $(\'#budget\').val();
		var Project_status = $(\'#project_status\').val();
		if(Jobtype!=\'\' || Budget!=\'\' || Project_status!=\'\'){
			window.location = SITEROOT+\'/leads/myleads/?Jobtype=\'+Jobtype+\'&Budget=\'+Budget+\'&Project_status=\'+Project_status;
		}
		
	//}
}
</script>
'; ?>

<!--Gray box-->
<?php echo '
<script type="text/javascript">
	var GB_ANIMATION = true;
    jQuery(document).ready(function(){
    	jQuery("a.greybox").click(function(){
        var t = this.title || jQuery(this).text() || this.href;
        GB_show("",this.href,500,500);
         return false;
       });
     });
	 
	 // For Declined message
	var GB_ANIMATION = true;
    jQuery(document).ready(function(){
    	jQuery("a.my_review").click(function(){
        var t = this.title || jQuery(this).text() || this.href;
 			GB_show("",this.href,450,700);
  			return false;
       });
     });
</script>
'; ?>


<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['header_end'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>


<section class="middle_portion">
	<section class="inner_head">Dashboard</section>
    <section class="inner_containstart">
    	<!-- dashboard Left Content Start -->
        	<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['cms_left_content'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
        <!-- dashboard Left Content End -->
        <!-- dashboard Right Content Start -->
        	<section class="dash_right">
            <section class="title_box">
            	<h4>My Leads</h4>
            	 <section class="clear"></section>
                 
                </section>                             
				<?php if ($this->_tpl_vars['msg']): ?><span style="padding:10px;"> <?php echo $this->_tpl_vars['msg']; ?>
 </span><?php endif; ?>
                
                <section class="mainbox_findjobs">
                
				<section class="myleads_manag_box">
                <form name="searchfrm" id="searchfrm" action="<?php echo $this->_tpl_vars['siteroot']; ?>
/leads/myleads/" method="POST" >
                 <section class="group_search_box">
					 <select class="select" name="jobtype" id="jobtype" style="width:200px;">
                        <option value="0">Select Job Type</option>
                        <?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['getallTradeJobType']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
                        <option value="<?php echo $this->_tpl_vars['getallTradeJobType'][$this->_sections['i']['index']]['id']; ?>
" <?php if ($_GET['id2'] == $this->_tpl_vars['getallTradeJobType'][$this->_sections['i']['index']]['id'] || $_POST['jobtype'] == $this->_tpl_vars['getallTradeJobType'][$this->_sections['i']['index']]['id']): ?> selected="selected" <?php endif; ?>><?php echo $this->_tpl_vars['getallTradeJobType'][$this->_sections['i']['index']]['trade_category']; ?>
</option>				                        
                        <?php endfor; endif; ?>
	                 </select>   &nbsp;&nbsp;
                     <select class="select" name="budget" id="budget" style="width:180px;">
                        <option value="0">Select Approximate Budget</option>
                        <?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['getallBudget']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
                        <option value="<?php echo $this->_tpl_vars['getallBudget'][$this->_sections['i']['index']]['budget_id']; ?>
" <?php if ($_GET['id3'] == $this->_tpl_vars['getallBudget'][$this->_sections['i']['index']]['budget_id'] || $_POST['budget'] == $this->_tpl_vars['getallBudget'][$this->_sections['i']['index']]['budget_id']): ?> selected="selected" <?php endif; ?>>Under $<?php echo $this->_tpl_vars['getallBudget'][$this->_sections['i']['index']]['budget_name']; ?>
</option>                     
                        <?php endfor; endif; ?>
                     </select>   &nbsp;&nbsp;                    
                     <select class="select" name="project_status" id="project_status" style="width:112px;">
                        <option value="0">Select Stauts</option>
                        <option value="Open" <?php if ($_GET['id4'] == 'Open' || $_POST['project_status'] == 'Open'): ?> selected="selected" <?php endif; ?>>Open</option>
                        <option value="Accept" <?php if ($_GET['id4'] == 'Accept' || $_POST['project_status'] == 'Accept'): ?> selected="selected" <?php endif; ?>>Accept</option>
                        <option value="Decline" <?php if ($_GET['id4'] == 'Decline' || $_POST['project_status'] == 'Decline'): ?> selected="selected" <?php endif; ?>>Decline</option>
                        <option value="Closed" <?php if ($_GET['id4'] == 'Closed' || $_POST['project_status'] == 'Closed'): ?> selected="selected" <?php endif; ?>>Closed</option>
                     </select>   &nbsp;&nbsp;                    
                    <input type="submit" class="btn" value="Go">
                    &nbsp;&nbsp;
                    <input type="button" class="btn btnwdth70" value="Clear" onclick="javascript:window.location='<?php echo $this->_tpl_vars['siteroot']; ?>
/leads/myleads/';">
                    <section class="clear"></section>
                  </section>
                  </form>
                	<dl>
                    	<dt class="col1">Job ID</dt>
                    	<dt class="col2">Job Type</dt>
                        <dt class="col3">Postal Code</dt>
                        <dt class="col4">Job Description</dt>
                        <dt class="col5" style="text-align:justify">Budget</dt>
                        <dt class="col6">Status</dt>
                        <dt class="col7">Action</dt>
                        <section class="clear"></section>
                    </dl>
                    <?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['leadsArray']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
                    <dl>
                    	<dd class="col1">#PR<?php echo $this->_tpl_vars['leadsArray'][$this->_sections['i']['index']]['postjob_id']; ?>
</dd>
                    	<dd class="col2"> <?php echo $this->_tpl_vars['leadsArray'][$this->_sections['i']['index']]['jobtypename']; ?>
 </dd>
                        <dd class="col3"><span style="padding-left:20px;"> <?php echo $this->_tpl_vars['leadsArray'][$this->_sections['i']['index']]['area']; ?>
 </span></dd>
                        <dd class="col4">
                        	<?php echo ((is_array($_tmp=$this->_tpl_vars['leadsArray'][$this->_sections['i']['index']]['job_desc'])) ? $this->_run_mod_handler('truncate', true, $_tmp, 50, "...") : smarty_modifier_truncate($_tmp, 50, "...")); ?>
 
                        </dd>
                        <dd class="col5" style="text-align:justify">$<?php echo $this->_tpl_vars['leadsArray'][$this->_sections['i']['index']]['budgetname']; ?>
</dd>
                        <dd class="col6"><?php echo $this->_tpl_vars['leadsArray'][$this->_sections['i']['index']]['new_status']; ?>
</dd>
                      <!--  <img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/default/images/icon_reportabuse.gif" width="20" height="22" alt="Report Abuse" title="Report Abuse"/> <img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/default/images/icon-search.png" width="20" height="22" alt="View Detail" title="View Detail"/> <img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/default/images/delete_icon.png" width="20" height="22" alt="Delete" title="Delete"/> <img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/default/images/icon-warnning.png" width="20" height="22" alt="Cant delete" title="Cant delete"/>-->
                        <dd class="col7 anchorlink"><a href="<?php echo $this->_tpl_vars['siteroot']; ?>
/leads/<?php echo ((is_array($_tmp=$this->_tpl_vars['leadsArray'][$this->_sections['i']['index']]['id'])) ? $this->_run_mod_handler('base64_encode', true, $_tmp) : smarty_modifier_base64_encode($_tmp)); ?>
/viewlead/" style="font-size:10px;" >View<br /> Detail</a> &nbsp;<?php if ($this->_tpl_vars['leadsArray'][$this->_sections['i']['index']]['new_status'] == 'Completed'):  if ($this->_tpl_vars['leadsArray'][$this->_sections['i']['index']]['getreview'] == 'no'): ?> <a href="<?php echo $this->_tpl_vars['siteroot']; ?>
/leads/rating/<?php echo ((is_array($_tmp=$this->_tpl_vars['leadsArray'][$this->_sections['i']['index']]['id'])) ? $this->_run_mod_handler('base64_encode', true, $_tmp) : smarty_modifier_base64_encode($_tmp)); ?>
/myleads/" style="font-size:10px;" onclick="javascript:return confirm('Are you sure do you want to sent request?');"  > Request<br /> Rating </a> <?php else: ?> <a href="<?php echo $this->_tpl_vars['siteroot']; ?>
/jobs/<?php echo $this->_tpl_vars['leadsArray'][$this->_sections['i']['index']]['reviewid']; ?>
/see/postreview/" class="my_review" style="font-size:10px">Your<br /> Rating </a>  <?php endif; ?>&nbsp;<?php else: ?> <a href="javascript:;" style="font-size:10px"> No <br/> Rating </a><?php endif;  if ($this->_tpl_vars['leadsArray'][$this->_sections['i']['index']]['project_status'] == 'Open'): ?> <a href="<?php echo $this->_tpl_vars['siteroot']; ?>
/leads/delete/<?php echo ((is_array($_tmp=$this->_tpl_vars['leadsArray'][$this->_sections['i']['index']]['id'])) ? $this->_run_mod_handler('base64_encode', true, $_tmp) : smarty_modifier_base64_encode($_tmp)); ?>
/myleads/" onclick="javascript:return confirm('Are you sure do you want to delete this record?');" style="font-size:10px;" >Delete</a> <?php else: ?> <a href="javascript:;" style="font-size:10px;" > Can't<br /> Delete </a> <?php endif; ?>&nbsp;<a href="<?php echo $this->_tpl_vars['siteroot']; ?>
/leads/<?php echo ((is_array($_tmp=$this->_tpl_vars['leadsArray'][$this->_sections['i']['index']]['postjob_id'])) ? $this->_run_mod_handler('base64_encode', true, $_tmp) : smarty_modifier_base64_encode($_tmp)); ?>
/reportabuse/" class="greybox" style="font-size:10px;" >Report <br />Abuse</a></dd>
                        <section class="clear"></section>
                    </dl>
                    <?php endfor; else: ?>
                    	<div class="error" style="padding:10px;text-align:center;">Oops, Sorry there are no leads.</div>
                    <?php endif; ?>
                  		<?php if ($this->_tpl_vars['pagenation']): ?>
                            <section class="pagna">
                            <?php echo $this->_tpl_vars['pagenation']; ?>

                            </section>
                        <?php endif; ?>
                             

                        
                        <section class="clear"></section>
                </section>  
                     <section class="clear"></section>
                 	 <section class="bgimg_shadow"></section>
                 	<section class="clear"></section>
                </section>
                
            </section>
        <!-- dashboard Right Content End -->
        	<section class="clear"></section>
    </section>
</section>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['footer'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>